package com.nidu.demo.dept.convertor;

import com.nidu.demo.convertor.MapStructConfig;
import com.nidu.demo.dept.dto.DepartmentListQry;
import com.nidu.demo.dept.dto.DepartmentPageQry;
import com.nidu.demo.dept.dto.DepartmentQry;
import com.nidu.demo.dept.dto.DepartmentTreeQry;
import com.nidu.demo.dept.model.DepartmentCriteria;
import org.mapstruct.Mapper;

/**
 * 部门查询条件转换器
 *
 * @author nidu
 */
@Mapper(config = MapStructConfig.class)
public interface DepartmentCriteriaConvertor {

    /**
     * 单个查询条件转换
     */
    DepartmentCriteria toDataObject(DepartmentQry qry);

    /**
     * 列表查询条件转换
     */
    DepartmentCriteria toDataObject(DepartmentListQry listQry);

    /**
     * 分页查询条件转换
     */
    DepartmentCriteria toDataObject(DepartmentPageQry pageQry);

    /**
     * 树形查询条件转换
     */
    DepartmentCriteria toDataObject(DepartmentTreeQry treeQry);
}
